home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIProtocolProxyCallback.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  120 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIProtocolProxyCallback.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIProtocolProxyCallback_h__
  6. #define __gen_nsIProtocolProxyCallback_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19. class nsIProxyInfo; /* forward declaration */
  20.  
  21. class nsICancelable; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsIProtocolProxyCallback */
  25. #define NS_IPROTOCOLPROXYCALLBACK_IID_STR "a9967200-f95e-45c2-beb3-9b060d874bfd"
  26.  
  27. #define NS_IPROTOCOLPROXYCALLBACK_IID \
  28.   {0xa9967200, 0xf95e, 0x45c2, \
  29.     { 0xbe, 0xb3, 0x9b, 0x06, 0x0d, 0x87, 0x4b, 0xfd }}
  30.  
  31. /**
  32.  * This interface servers as a closure for nsIProtocolProxyService's
  33.  * asyncResolve method.
  34.  *
  35.  * @status UNDER_REVIEW
  36.  */
  37. class NS_NO_VTABLE nsIProtocolProxyCallback : public nsISupports {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROTOCOLPROXYCALLBACK_IID)
  41.  
  42.   /**
  43.    * This method is called when proxy info is available or when an error
  44.    * in the proxy resolution occurs.
  45.    *
  46.    * @param aRequest
  47.    *        The value returned from asyncResolve.
  48.    * @param aURI
  49.    *        The URI passed to asyncResolve.
  50.    * @param aProxyInfo
  51.    *        The resulting proxy info or null if there is no associated proxy
  52.    *        info for aURI.  As with the result of nsIProtocolProxyService's
  53.    *        resolve method, a null result implies that a direct connection
  54.    *        should be used.
  55.    * @param aStatus
  56.    *        The status of the callback.  This is a failure code if the request
  57.    *        could not be satisfied, in which case the value of aStatus
  58.    *        indicates the reason for the failure.
  59.    */
  60.   /* void onProxyAvailable (in nsICancelable aRequest, in nsIURI aURI, in nsIProxyInfo aProxyInfo, in nsresult aStatus); */
  61.   NS_IMETHOD OnProxyAvailable(nsICancelable *aRequest, nsIURI *aURI, nsIProxyInfo *aProxyInfo, nsresult aStatus) = 0;
  62.  
  63. };
  64.  
  65. /* Use this macro when declaring classes that implement this interface. */
  66. #define NS_DECL_NSIPROTOCOLPROXYCALLBACK \
  67.   NS_IMETHOD OnProxyAvailable(nsICancelable *aRequest, nsIURI *aURI, nsIProxyInfo *aProxyInfo, nsresult aStatus); 
  68.  
  69. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  70. #define NS_FORWARD_NSIPROTOCOLPROXYCALLBACK(_to) \
  71.   NS_IMETHOD OnProxyAvailable(nsICancelable *aRequest, nsIURI *aURI, nsIProxyInfo *aProxyInfo, nsresult aStatus) { return _to OnProxyAvailable(aRequest, aURI, aProxyInfo, aStatus); } 
  72.  
  73. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  74. #define NS_FORWARD_SAFE_NSIPROTOCOLPROXYCALLBACK(_to) \
  75.   NS_IMETHOD OnProxyAvailable(nsICancelable *aRequest, nsIURI *aURI, nsIProxyInfo *aProxyInfo, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnProxyAvailable(aRequest, aURI, aProxyInfo, aStatus); } 
  76.  
  77. #if 0
  78. /* Use the code below as a template for the implementation class for this interface. */
  79.  
  80. /* Header file */
  81. class nsProtocolProxyCallback : public nsIProtocolProxyCallback
  82. {
  83. public:
  84.   NS_DECL_ISUPPORTS
  85.   NS_DECL_NSIPROTOCOLPROXYCALLBACK
  86.  
  87.   nsProtocolProxyCallback();
  88.  
  89. private:
  90.   ~nsProtocolProxyCallback();
  91.  
  92. protected:
  93.   /* additional members */
  94. };
  95.  
  96. /* Implementation file */
  97. NS_IMPL_ISUPPORTS1(nsProtocolProxyCallback, nsIProtocolProxyCallback)
  98.  
  99. nsProtocolProxyCallback::nsProtocolProxyCallback()
  100. {
  101.   /* member initializers and constructor code */
  102. }
  103.  
  104. nsProtocolProxyCallback::~nsProtocolProxyCallback()
  105. {
  106.   /* destructor code */
  107. }
  108.  
  109. /* void onProxyAvailable (in nsICancelable aRequest, in nsIURI aURI, in nsIProxyInfo aProxyInfo, in nsresult aStatus); */
  110. NS_IMETHODIMP nsProtocolProxyCallback::OnProxyAvailable(nsICancelable *aRequest, nsIURI *aURI, nsIProxyInfo *aProxyInfo, nsresult aStatus)
  111. {
  112.     return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114.  
  115. /* End of implementation class template. */
  116. #endif
  117.  
  118.  
  119. #endif /* __gen_nsIProtocolProxyCallback_h__ */
  120.